#ifndef _JIAJIA_ENV_H
#define _JIAJIA_ENV_H

#define JiaJia_env_alloc() Yu_alloc(sizeof(JiaJia_env_t), JiaJia_env_meminit, JiaJia_env_memfree)
#define JiaJia_env_init(jjenv) JiaJia_env_meminit(jjenv, sizeof(JiaJia_env_t))
#define JiaJia_env_free(jjenv) JiaJia_env_memfree(jjenv, sizeof(JiaJia_env_t))

#define _JiaJia_ENV_ERR -1
#define _JiaJia_ENV_LANG 0
#define _JiaJia_ENV_SCRIPT 1
#define _JiaJia_ENV_RUN 2

#define _JiaJia_ENV_REDUCE_IF 8
#define _JiaJia_ENV_REDUCE_ELSE 8
#define _JiaJia_ENV_REDUCE_WHILE 8

typedef struct _JiaJia_env_err{
} _JiaJia_env_err_t;

typedef struct _JiaJia_env_lang{
} _JiaJia_env_lang_t;

typedef struct _JiaJia_env_script{
} _JiaJia_env_script_t;

typedef struct _JiaJia_env_run{
} _JiaJia_env_run_t;

typedef struct _JiaJia_env_reduce_if{
} _JiaJia_env_reduce_if_t;

typedef struct JiaJia_env{
    int32_t type;
    union {
        _JiaJia_env_err_t err;
        _JiaJia_env_lang_t lang;
        _JiaJia_env_script_t script;
        _JiaJia_env_run_t run;
        _JiaJia_env_reduce_if_t reduce_if;
    };
    struct JiaJia_env *next;
} JiaJia_env_t, *JiaJia_env_pt;

extern void JiaJia_env_meminit(void *, size_t);
extern void JiaJia_env_memfree(void *, size_t);

#endif
